/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Result } from '../models/Result';
import type { User_ } from '../models/User_';
import type { UserRequestParam } from '../models/UserRequestParam';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class UserControllerService {

    /**
     * addUser
     * @param user user
     * @returns Result OK
     * @returns any Created
     * @throws ApiError
     */
    public static addUserUsingPost(
user: User_,
): CancelablePromise<Result | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/user/add',
            body: user,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * deleteUser
     * @param id id
     * @returns Result OK
     * @throws ApiError
     */
    public static deleteUserUsingGet(
id: string,
): CancelablePromise<Result> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/user/delete/{id}',
            path: {
                'id': id,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * getMe
     * @returns Result OK
     * @throws ApiError
     */
    public static getMeUsingGet(): CancelablePromise<Result> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/user/me',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * listPage
     * @param userRequestParam userRequestParam
     * @returns Result OK
     * @returns any Created
     * @throws ApiError
     */
    public static listPageUsingPost3(
userRequestParam: UserRequestParam,
): CancelablePromise<Result | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/user/page',
            body: userRequestParam,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * updateUser
     * @param user user
     * @returns Result OK
     * @returns any Created
     * @throws ApiError
     */
    public static updateUserUsingPost(
user: User_,
): CancelablePromise<Result | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/user/update',
            body: user,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

}
